<script setup lang="ts">
import { ref } from 'vue'

// 可以把
const age = ref(30)
const person = ref({ name: '张三', age: 18 })
const changeAge = () => {
  // 函数对象都返回在了value里
  person.value.age++
}
</script>

<template>
  <div class="app-page">
    <div>{{ age }}</div>
    <div>姓名：{{ person.name }},年龄：{{ person.age }}</div>
    <button @click="changeAge">改年龄</button>
  </div>
</template>

<style lang="css" scoped></style>
